package temp.library;

import javax.enterprise.context.SessionScoped;
import javax.inject.Named;
import java.io.Serializable;

/**
 * 02.11.14
 *
 * @author horec
 */
@Named
@SessionScoped
public class NavigationController implements Serializable {
    private Page p;

    public void selectBooks() {
        p=Page.BOOKS;
    }

    public void selectReaders() {
        p=Page.READERS;
    }

    public boolean getBookSelected() {
        return p==Page.BOOKS;
    }

    public boolean getReadersSelected() {
        return p==Page.READERS;
    }

    public void setMain() {
        p=Page.MAIN;
    }


    public static enum Page {
        MAIN,
        BOOKS,
        READERS
    }
}


